﻿using System;
using System.Net;
using System.IO;

namespace DotNetDetour
{
    public class Class1
    {
        public static int Install_Core(string A)
        {
            return MethodHook.Install();
        }
        public static string GetWebClient(string url)
        {
            string text = "";
            WebClient webClient = new WebClient();
            Stream stream = webClient.OpenRead(url);
            StreamReader streamReader = new StreamReader(stream, System.Text.Encoding.UTF8);
            text = streamReader.ReadToEnd();
            stream.Close();
            return text;
        }

        public static string getBetween(string strSource, string strStart, string strEnd)
        {
            if (strSource.Contains(strStart) && strSource.Contains(strEnd))
            {
                int num = strSource.IndexOf(strStart, 0) + strStart.Length;
                int num2 = strSource.IndexOf(strEnd, num);
                return strSource.Substring(num, num2 - num);
            }
            return "";
        }
    }
}
